package mp

import (
	"duoke/service"
	"duoke/utils/gconv"
	"duoke/utils/request"
	"duoke/utils/response"
	"github.com/gin-gonic/gin"
)

var CourseLecturer = new(courseLecturerCtl)

type courseLecturerCtl struct{}

// Info 教师资质详情
func (ctl *courseLecturerCtl) Info(c *gin.Context) {
	req := request.JsonMap(c)
	id := gconv.Int(req["id"])
	if id == 0 {
		response.Error(c, "参数缺失【id】", nil)
		return
	}
	info, err := service.CourseLecturer.Info(id)
	if err != nil {
		response.Error(c, err.Error(), nil)
		return
	}
	response.Success(c, "获取成功", info)
	return

}
